<template>
  <div class="info">
    <el-form label-width="100px" style="width: 600px">
      <el-form-item label="公司名称">
        <el-input v-model="companyInfo.name" disabled />
      </el-form-item>
      <el-form-item label="公司地址">
        <el-input v-model="companyInfo.companyAddress" disabled />
      </el-form-item>
      <el-form-item label="邮箱">
        <el-input v-model="companyInfo.mailbox" disabled />
      </el-form-item>
      <el-form-item label="备注">
        <el-input
          v-model="companyInfo.remarks"
          type="textarea"
          :rows="3"
          disabled
        />
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import { company } from '@/api/setting'
import { mapState } from 'vuex'
export default {
  data() {
    return {
      companyInfo: ''
    }
  },
  computed: {
    ...mapState('user', ['userInfo'])
  },
  created() {
    // console.log('info')
    this.getData()
  },
  methods: {
    async getData() {
      const res = await company(this.userInfo.companyId)
      this.companyInfo = res.data
      console.log('企业信息', res)
    }
  }
}
</script>
<style></style>
